//
//  ChangeHeaderImageCell.m
//  yunyan
//
//  Created by haichuang on 2018/3/28.
//  Copyright © 2018年 haichuang. All rights reserved.
//

#import "ChangeHeaderImageCell.h"

@implementation ChangeHeaderImageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createImageCell];
        
    }
    return self;
}

-(void)createImageCell{
    WeakSelf;
    _image = [[UIImageView alloc] init];
    [self addSubview:_image];
    [_image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo (weakSelf).offset (17.0f);
        make.height.width.equalTo (@(40));
    }];
    _image.layer.masksToBounds = YES;
    _image.layer.cornerRadius = 20.f;
  
    _image.backgroundColor = [UIColor orangeColor];
    
    _nameLabel = [[UILabel alloc ]init];
    [self addSubview:_nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo (_image.mas_right).offset (25.0f);
        make.centerY.equalTo (_image.mas_centerY);
    }];
    _nameLabel.font = [UIFont systemFontOfSize:15.0f];
    _nameLabel.textColor = RGBA(51, 51, 51, 1);
    _nameLabel.text = @"修改头像";
}



@end
